package all_in_one;

public class Count extends Thread {

	private final int init_val = 0;
	private int m_counter = init_val;
	
	public Count() {
		
	}
	
	public synchronized void Add(int inc)
	{
		m_counter = m_counter + inc;
		if(m_counter > 6) System.out.println("counter > 6");
		return;
	}
	
	public synchronized void Reset()
	{
		m_counter = init_val;
		return;
	}
	
	public synchronized int GetValue()
	{
		return m_counter;
	}
}
